<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
<!-- dodawanie kategorii -->
<a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel2')}.show()" reRender="panel2" />
    <rich:modalPanel id="panel2" width="400" height="80"  showWhenRendered="#{zak.paneldodawaniekategorii}">
        <f:facet name="header">
            <h:panelGroup>Dodawanie kategorii</h:panelGroup>
        </f:facet>
<a4j:form>
   <h:panelGrid columns="3">
   	<h:outputText value="Nazwa :" />
   	<h:inputText id="form_kategoria" value="#{zak.strKategoriaModal}" />
   	<a4j:commandButton  reRender="form_kategoria,kategorie,panel3" id="dodajogloszeniekategoria" action="#{zak.dodajkategorieprzycisk}" value="Dodaj" title="dodaj ogłoszenie"/>
   </h:panelGrid>
</a4j:form>
        <f:facet name="controls">
            <h:panelGroup>
            	<h:commandButton id="hidelink1kategoria" value="X"/><rich:componentControl for="panel2" attachTo="hidelink1kategoria" operation="hide" event="onclick"/>
            </h:panelGroup>
        </f:facet>
    </rich:modalPanel>
<!-- KONIEC dodawanie kategorii -->
</html>